package com.stylefeng.guns.common.enu;

public enum BillStateEnum {

    UNAPPROVED(1,"未审批"),
    INVOICE(2,"业务经理已审批"),
    PROCESSED(3,"人事经理已审批"),
    CANCEL(4,"待发薪"),
    COMPLETED(0,"处理完成");

    private Integer code;
    private String name;

    BillStateEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getName(Integer code) {
        if(code==null){
            return "未知";
        }
        for (BillStateEnum emu : BillStateEnum.values()) {
            if (emu.code.equals(code)) {
                return emu.name;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
